<?php

namespace App\Http\Requests\Company\Department;
use App\Http\Requests\Request;

class DepartmentUpdateRequest extends Request {
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'name'=>'required',
            'contacts'=>'required',
            'phone'=>'check_company_phone',
            'fax'=>'check_fax',
            'email'=>'email',
        ];
    }
    public function messages(){
        return [
            'name.required'=>'部门名称不能为空',
            'contacts.required'=>'联系人不能为空',
            'phone.check_company_phone'=>'请输入正确的电话号码',
            'fax.check_fax'=>'请输入正确的传真号码',
            'email.email'=>'请输入正确的邮箱地址',
        ];
    }
}